<h1><?php echo 'An error occurred' ?></h1>
<h2><?php echo $message ?></h2>
<?php if ($displayException): ?>
    <hr />
    <h2>Additional Information</h2>
    <h3><?php echo get_class($exception); ?></h3>
    <dl>
        <dt>File:</dt>
        <dd>
            <span><?php echo $exception->getFile(), ' (<b>Line: ', $exception->getLine(), '</b>)' ?></span>
        </dd>
        <dt>Message:</dt>
        <dd>
            <span><?php echo $exception->getMessage() ?></span>
        </dd>
        <dt>Stack trace:</dt>
        <dd>
            <pre><?php echo $exception->getTraceAsString() ?></pre>
        </dd>
    </dl>
    <?php if (($e = $exception->getPrevious())) : ?>
        <hr/>
        <h2>Previous exceptions:</h2>
        <ul>
            <?php while ($e) : ?>
                <li>
                    <h3><?php echo get_class($e); ?></h3>
                    <dl>
                        <dt>File:</dt>
                        <dd>
                            <span><?php echo $e->getFile(), ' (<b>Line: ', $e->getLine(), '</b>)' ?></span>
                        </dd>
                        <dt>Message:</dt>
                        <dd>
                            <span><?php echo $e->getMessage() ?></span>
                        </dd>
                        <dt>Stack trace:</dt>
                        <dd>
                            <pre><?php echo $e->getTraceAsString() ?></pre>
                        </dd>
                    </dl>
                </li>
                <?php
                $e = $e->getPrevious();
            endwhile;
            ?>
        </ul>
    <?php endif; ?>
<?php endif; ?>